package com.music.client.songs.client.impl;

import java.util.Collection;
import java.util.List;

import org.springframework.beans.factory.annotation.Required;

import com.music.client.songs.client.SongClient;
import com.music.service.songs.beans.Song;
import com.music.service.songs.service.SongService;

public class SongClientImpl implements SongClient {

	private SongService mSongService;
	
	

	public Song addNewSong(Long pMemberId, Song pSong) {
		return getSongService().addNewSong(pMemberId, pSong);
	}

	public boolean checkMemberPermissionForSong(Long pMemberId, Long pSongId) {
		return getSongService().checkMemberPermissionForSong(pMemberId, pSongId);
	}

	public void deleteSong(Song pSong){
		 getSongService().deleteSong(pSong);
	}

	public Song editSong(Song pSong){
		return getSongService().editSong(pSong);
	}

	public boolean setPreferredUrlForSongForMember(Long pMemberId,Long pSongId, Long pUrlId) {
		return getSongService().setPreferredUrlForSongForMember(pMemberId, pSongId, pUrlId);
	}

	public List<Song> viewSongs(Collection<Long> pSongIds) {
		return getSongService().viewSongs(pSongIds);
	}

	/**
	 * @return the songClient
	 */
	public SongService getSongService() {
		return mSongService;
	}

	/**
	 * @param pSongService the songService to set
	 */
	@Required
	public void setSongService(SongService pSongService) {
		mSongService = pSongService;
	}


}
